## Script (Python) "mrucategories"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
props = context.portal_properties.sdotNews_properties
typesToDisplay = props.typesToDisplay
newsPageSize = props.newsPageSize
newsportletSize = props.newsPortletSize
results = context.portal_catalog.searchResults( portal_type=typesToDisplay, sort_on='Date', sort_order='reverse', review_state='published')[:newsPageSize]
alist =[]
for r in results:
    parent = r.getObject().aq_parent
    if not parent in alist:
        alist.append(parent)
return alist[:newsportletSize]
